Add support for remaining config variables from the old to-be-deprecated Config interface and add a new config class - #758
Open
ubaskota wants to merge 1 commit into
Conversation
…ted Config interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Adds the remaining AWS-shared config fields to
AsyncAwsConfig, bringing it to parity with the generated service Config class.endpoint_uri, aws_access_key_id, aws_secret_access_key, aws_session_token, sdk_ua_app_id, user_agent_extra, interceptors, http_request_config, transport, retry_strategy, aws_credentials_identity_resolver. Resolvable fields wire into theenv > profile > defaultresolution pipeline.Async<ServiceId>Config(AsyncAwsConfig)with service-specific_FIELDSthat override the base class example:endpoint_uriuses a service-aware resolver that checksAWS_ENDPOINT_URL_<SERVICE_ID>and the services config section before falling back to global sources.Config(with a deprecation warning) and the newAsync<ServiceId>Config, so existing users continue to work while new users adopt the async resolution path. The generated client accepts either type viaisinstancedispatch.get_service_config()onMergedConfigfor services-section lookups, and updatesRetryStrategyResolverto acceptretry_mode/max_attemptsfallbacks from the config layer.Testing:
EndpointUriResolvercovering the full precedence chain:service-specific env var > global env var > service config section > global profile > unset.MergedConfig.get_service_config()covering all lookup paths (profile missing, services key missing, service section not found, multiple services).RetryStrategyResolverfallback behavior:retry_mode/max_attemptsparams used whenretry_strategyis None, explicit strategy takes precedence over fallbacks.Example Usage:
Resolve service config and inspect provenance:
Invalid profile raises a clear error:
Refer to #751 for more examples.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.